﻿//////////////////////////////////////////////////////////////////
// File name:       Particle.cs
// Author:          Seth Jacobson
// Modified by:
// Last modified:   3.19.2011
// File purpose:    Particle class
//////////////////////////////////////////////////////////////////

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Run_Game_Windows.Particle_System
{
    public class Particle
    {
        // Fields
        private Microsoft.Xna.Framework.Vector2 m_tVelocity;
        private float                           m_fLifetime;
        private float                           m_fAge;

        // Properties
        public Microsoft.Xna.Framework.Vector2  Velocity
        {
            get { return m_tVelocity; }
            set { m_tVelocity = value; }
        }
        public float                            Lifetime
        {
            get { return m_fLifetime; }
            set { m_fLifetime = value; }
        }
        public float                            Age
        {
            get { return m_fAge; }
            set { m_fAge = value; }
        }

        // Constructor
        public Particle()
        {
            Velocity = new Microsoft.Xna.Framework.Vector2(0.0f, 0.0f);
            Lifetime = 0.0f;
            Age = 0.0f;
        }
        // Alternate constructor
        public Particle(float fLifetime, Microsoft.Xna.Framework.Vector2 vVelocity)
        {
            Velocity = vVelocity;
            Lifetime = fLifetime;
            Age = 0.0f;
        }

        // Update
        public void Update(float fDeltaTime)
        {
            // It's my birthday
            Age += fDeltaTime;

            if (Age >= Lifetime)
            {
                // Kill me, cuz i'm dead
            }


        }
    }
}
